<table>
	<tr>
		<td><div ng-if="vm.settlement.notExistPayment" class="panel-heading font-bold">{{"label.settlement.hinttext.nopaydetailavailable" | translate}}</div></td>
	</tr>
	<tr ng-repeat="item in vm.settlement.payDetails track by $index">
		<td>
			<table>
				<tr>
					<td width="95%">
						<div class="col-sm-12"><fs-grid-layout ng-model="item" fs-config="vm.payDetailDynaHeadConfig['pd' + item.payItemSeq]"></fs-grid-layout></div>
					</td>
					<td ng-show="item.paymentData" width="5%" style="cursor: pointer;" ng-click="isCollapsed_pay=!isCollapsed_pay"><i class="pull-right glyphicon glyphicon-chevron-right" ng-class="{'glyphicon-chevron-down': isCollapsed_pay, 'glyphicon-chevron-right': !isCollapsed_pay}"></i></td>
				</tr>
				<tr uib-collapse="!isCollapsed_pay">
					<td colspan="2">
						<fs-grid-layout ng-if="item.deliveryType" ng-model="item" fs-config="vm.deliveryTypeConfig['pd' + item.payItemSeq]"></fs-grid-layout>
						<fs-grid-layout ng-if="item.deliveryType == 'M'" ng-model="item" fs-config="vm.mailConfig['pd' + item.payItemSeq]"></fs-grid-layout>
						<fs-grid-layout ng-if="item.deliveryType == 'E'" ng-model="item" fs-config="vm.emailConfig['pd' + item.payItemSeq]"></fs-grid-layout>
						<fs-grid-layout ng-if="item.deliveryType == 'F'" ng-model="item" fs-config="vm.faxConfig['pd' + item.payItemSeq]"></fs-grid-layout>
						
						<fs-tabset ng-if="item.payCodeObj && item.payCodeObj.paycodeCat.substr(7) == 'CHECK'">
							<fs-tab index="0" heading="{{'title.tab.paycheck' | translate}}">
							    <ng-form name="paycheckForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.payCheckConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						</fs-tabset>
						<fs-tabset ng-if="item.payCodeObj && item.payCodeObj.paycodeCat.substr(7) == 'INVOICE'">
							<fs-tab index="0" heading="{{'title.tab.payinvoice' | translate}}">
							    <ng-form name="payInvoiceForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.payInvoiceConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						</fs-tabset>
						<fs-tabset ng-if="item.payCodeObj && item.payCodeObj.paycodeCat.substr(7) == 'DDA'">
							<fs-tab index="0" heading="{{'title.tab.paydda' | translate}}">
							    <ng-form name="payDdaForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.payDdaConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						</fs-tabset>
						
						<fs-tabset ng-if="item.payCodeObj && item.payCodeObj.paycodeCat.substr(7) == 'SWIFT'">
							<fs-tab index="0" heading="{{'title.tab.swift.paymentinfo' | translate}}">
							    <ng-form name="swiftForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.paymentInfoConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						  	<fs-tab index="1" heading="{{'title.tab.swift.sendertoreceiverinfo' | translate}}">
							    <ng-form name="swiftForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.senderToReceiverInfoConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						  	<fs-tab index="2" heading="{{'title.tab.swift.otherinfo' | translate}}">
							    <ng-form name="swiftForm">	
								     <fs-grid-layout ng-model="item.paymentData" fs-config="vm.otherInfoConfig['pd' + item.payItemSeq]" fs-validator-config="vm.validatorConfig">
								     </fs-grid-layout>
							    </ng-form>
						  	</fs-tab>
						</fs-tabset>
						<fs-tabset ng-if="item.payCodeObj && item.payCodeObj.paycodeCat.substr(7) == 'SWIFT'">
						  	<fs-tab index="$index" heading="{{partyType.label | translate}}" 
						  			ng-repeat="partyType in item.paymentData.payPartyTabs track by $index" ng-show="partyType.value != 'SI'">
						  		<ng-form name="payPartyForm">
						  			<fs-grid-layout ng-model="item.paymentData.payParties[$index]" fs-config="vm.payPartyConfig['pd' + item.payItemSeq][$index]" fs-validator-config="vm.validatorConfig.payPartys"></fs-grid-layout>
						  		</ng-form>
						  	</fs-tab> 
						</fs-tabset> 
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>